package com.itheima.jicheng.test6;

public class Demo6 {
    public static void main(String[] args) {
        Teacher teacher = new BaseTeacher("张三老师",23);
        System.out.println(teacher.getName()+"..."+teacher.getAge());
        teacher.teach();
    }
}
abstract class Teacher{
    private String name;
    private int age;

    public Teacher() {
    }

    public Teacher(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public abstract void teach();
}

class BaseTeacher extends Teacher{
    public BaseTeacher() {
    }

    public BaseTeacher(String name, int age) {
        super(name, age);
    }

    @Override
    public void teach() {
        System.out.println("基础班老师讲JavaSE");
    }
}

class WorkTeacher extends Teacher{
    public WorkTeacher() {
    }

    public WorkTeacher(String name, int age) {
        super(name, age);
    }

    @Override
    public void teach() {
        System.out.println("就业班老师讲JavaEE");
    }
}
